<?php

/**
 * gcException
 * @author    Soochow University
 * @version   1.0
 * @exclude   作  成  日：2011/04/07
 */
class gcExceptionDealer {
    
    /**
     * エラー投げる
     * setException
     * @param Exception $exception
     * @throws gcException
     */
    public static function setException($exception){
        require_once "application/library/exception/gcException.php";
        throw new gcException($exception->getMessage());
    }
    
    /**
     * 新しいAJAXエラーを投げる
     * gcAjaxException
     */
    public function throwAjaxException(){
        require_once "application/library/exception/gcAjaxException.php";
        throw new gcAjaxException();
    }
    
    /**
     * 新しいエラーを投げる
     * throwGcException
     */
    public static function throwGcException(){
        require_once "application/library/exception/gcException.php";
        throw new gcException();
    }
}
